package axht.trade.android.listview;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener  {

    private Button btn_array_adapter;
    private Button btn_simple_adapter;
    private Button btn_base_adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn_array_adapter = findViewById(R.id.btn_array_adapter);
        btn_simple_adapter = findViewById(R.id.btn_simple_adapter);
        btn_base_adapter = findViewById(R.id.btn_base_adapter);

        btn_array_adapter.setOnClickListener(this);
        btn_simple_adapter.setOnClickListener(this);
        btn_base_adapter.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_array_adapter:
                startActivity(new Intent(this, ArrayListViewAdapter.class));
                break;
            case R.id.btn_simple_adapter:
                startActivity(new Intent(this, SimpleListViewAdapter.class));
                break;
            case R.id.btn_base_adapter:
                startActivity(new Intent(this, BaseListViewAdapter.class));
                break;

        }
    }
}
